package responsibilitychain;

/**
 * 院长
 * @author Fengdong.Duan
 * @create 2023/12/5 15:00
 */
public class Dean extends Approver {
    public Dean() {
        super("院长");
    }

    @Override
    void handleRequest(PurchaseRequest request) {
        if (request.getAmount() <= 10000) {
            System.out.println("Purchase request for " + request.getItemName() + " approved by " + name + " apply for " + request.getAmount());
        } else if (next != null) {
            next.handleRequest(request);
        }
    }
}
